<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>系统提示</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
</head>
<body>
<div style="text-align: center; padding: 50px;">
    <h2 th:text="${msg}" style="font-size: 20px; color: cornflowerblue; margin-bottom: 2em;"></h2>
    <p style="color:gray; font-size: 14px; margin-bottom: 2em;"><span>状态码</span><span th:text="${code}"></span></p>
    <p>
        <a th:href="${url}" id="href"
           style="background: cornflowerblue; color: white; border-radius: 10px; line-height: 30px; text-decoration: none; width: 200px; font-size: 14px; display: inline-block">
            <div>点击跳转 <span id="wait">10</span></div>
        </a>
    </p>
</div>
<script type="text/javascript">
  var wait = document.getElementById('wait'), url = document.getElementById('href').href;
  var interval = setInterval(function () {
    var time = --wait.innerHTML;
    if (time <= 0) {
      window.location.href = url;
      clearInterval(interval);
    }
  }, 1000);
</script>
</body>
</html>
